package com.wang.gulimall.order.service;

import com.alipay.api.AlipayApiException;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wang.common.to.mq.SeckillOrderTo;
import com.wang.common.utils.PageUtils;
import com.wang.gulimall.order.entity.OrderEntity;
import com.wang.gulimall.order.vo.*;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author wangliuyang
 * @email 1842184157@qq.com
 * @date 2021-01-12 18:51:13
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;

    OrderConfirmVo getConfirmOrder() throws ExecutionException, InterruptedException;

    SubmitOrderResponseVo createSubmitOrder(OrderSubmitVo vo) throws ExecutionException, InterruptedException;

    Boolean cancelOrder(String orderSn);

    List<OrderListVo> listMemberOrderList();

    OrderEntity getOrderByOrderSn(String orderSn);

    //定时关闭订单
    void closeOrder(OrderEntity orderEntity);

    void createSeckillOrder(SeckillOrderTo orderTo);

    PayVo getOrderPay(String orderSn);

    PageUtils queryPageWithItem(Map<String, Object> params);

    String handleAliPay(PayAsyncVo asyncVo);

    void alipayCloseOrder(OrderEntity orderEntity) throws AlipayApiException;
}

